package reflect;

public class Person {
    private String name = "张三";
    private int age = 18;
    public Person() {}

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public void sayHello() {
        System.out.println(name+":hello");
    }
    public void sayHi() {
        System.out.println(name+":hi");
    }
    public int sayOne() {
        System.out.println(name+":one");
        return 1;
    }
    public void watchTv() {
        System.out.println(name+":看电视");
    }
    public void sing() {
        System.out.println(name+":唱歌");
    }
    public void doSomeThing(String someThing) {
        System.out.println(name+someThing);
    }
    public void doSomeThing(String someThing,int count) {
        for(int i = 0;i<count;i++) {
            System.out.println(name+"正在做"+someThing+i+"次");
        }

    }
    private void doSome() {
        System.out.println("我是Person的私有方法");
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
